package com.xkcoding.dubbo.provider.service;


import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.apache.dubbo.rpc.RpcContext;


/**
 * <p>
 * Hello服务实现
 * </p>
 *
 * @package: com.xkcoding.dubbo.provider.service
 * @description: Hello服务实现
 * @author: yangkai.shen
 * @date: Created in 2018-12-25 16:58
 * @copyright: Copyright (c) 2018
 * @version: V1.0
 * @modified: yangkai.shen
 */

@Slf4j
@DubboService(timeout = 5000)
public class HelloServiceImpl implements HelloService {
    /**
     * 问好
     *
     * @param name 姓名
     * @return 问好
     */
    @Override
    public String sayHello(String name) {

        log.info("rpcContext:{}", RpcContext.getContext().getAttachment("dkb"));

        log.info("someone is calling me......");
        return "say hello to: " + name;
    }
}
